﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeCurveCurveInt2d : OdGeEntity2d
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeCurveCurveInt2d(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGeCurveCurveInt2d_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeCurveCurveInt2d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeCurveCurveInt2d()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeCurveCurveInt2d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGeCurveCurveInt2d() : this(GlobalsPINVOKE.new_OdGeCurveCurveInt2d__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurveCurveInt2d(OdGeCurve2d curve1, OdGeCurve2d curve2, OdGeTol tol) : this(GlobalsPINVOKE.new_OdGeCurveCurveInt2d__SWIG_1(OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2), OdGeTol.getCPtr(tol)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurveCurveInt2d(OdGeCurve2d curve1, OdGeCurve2d curve2) : this(GlobalsPINVOKE.new_OdGeCurveCurveInt2d__SWIG_2(OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurveCurveInt2d(OdGeCurve2d curve1, OdGeCurve2d curve2, OdGeInterval range1, OdGeInterval range2, OdGeTol tol) : this(GlobalsPINVOKE.new_OdGeCurveCurveInt2d__SWIG_3(OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2), OdGeInterval.getCPtr(range1), OdGeInterval.getCPtr(range2), OdGeTol.getCPtr(tol)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurveCurveInt2d(OdGeCurve2d curve1, OdGeCurve2d curve2, OdGeInterval range1, OdGeInterval range2) : this(GlobalsPINVOKE.new_OdGeCurveCurveInt2d__SWIG_4(OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2), OdGeInterval.getCPtr(range1), OdGeInterval.getCPtr(range2)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurveCurveInt2d(OdGeCurveCurveInt2d source) : this(GlobalsPINVOKE.new_OdGeCurveCurveInt2d__SWIG_5(OdGeCurveCurveInt2d.getCPtr(source)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurve2d curve1()
		{
			OdGeCurve2d result = new OdGeCurve2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_curve1(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurve2d curve2()
		{
			OdGeCurve2d result = new OdGeCurve2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_curve2(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getIntRanges(OdGeInterval range1, OdGeInterval range2)
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_getIntRanges(this.swigCPtr, OdGeInterval.getCPtr(range1), OdGeInterval.getCPtr(range2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeTol tolerance()
		{
			OdGeTol result = new OdGeTol(GlobalsPINVOKE.OdGeCurveCurveInt2d_tolerance(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int numIntPoints()
		{
			int result = GlobalsPINVOKE.OdGeCurveCurveInt2d_numIntPoints(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGePoint2d intPoint(int intNum)
		{
			OdGePoint2d result = new OdGePoint2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_intPoint(this.swigCPtr, intNum), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getIntParams(int intNum, out double param1, out double param2)
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_getIntParams(this.swigCPtr, intNum, out param1, out param2);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getPointOnCurve1(int intNum, OdGePointOnCurve2d intPnt)
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_getPointOnCurve1(this.swigCPtr, intNum, OdGePointOnCurve2d.getCPtr(intPnt));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getPointOnCurve2(int intNum, OdGePointOnCurve2d intPnt)
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_getPointOnCurve2(this.swigCPtr, intNum, OdGePointOnCurve2d.getCPtr(intPnt));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void getIntConfigs(int intNum, ref OdGe.OdGeXConfig config1wrt2, ref OdGe.OdGeXConfig config2wrt1)
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_getIntConfigs(this.swigCPtr, intNum, ref config1wrt2, ref config2wrt1);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isTangential(int intNum)
		{
			bool result = GlobalsPINVOKE.OdGeCurveCurveInt2d_isTangential(this.swigCPtr, intNum);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isTransversal(int intNum)
		{
			bool result = GlobalsPINVOKE.OdGeCurveCurveInt2d_isTransversal(this.swigCPtr, intNum);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double intPointTol(int intNum)
		{
			double result = GlobalsPINVOKE.OdGeCurveCurveInt2d_intPointTol(this.swigCPtr, intNum);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int overlapCount()
		{
			int result = GlobalsPINVOKE.OdGeCurveCurveInt2d_overlapCount(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool overlapDirection()
		{
			bool result = GlobalsPINVOKE.OdGeCurveCurveInt2d_overlapDirection(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getOverlapRanges(int overlapNum, OdGeInterval range1, OdGeInterval range2)
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_getOverlapRanges(this.swigCPtr, overlapNum, OdGeInterval.getCPtr(range1), OdGeInterval.getCPtr(range2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void changeCurveOrder()
		{
			GlobalsPINVOKE.OdGeCurveCurveInt2d_changeCurveOrder(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeCurveCurveInt2d orderWrt1()
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_orderWrt1(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurveCurveInt2d orderWrt2()
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_orderWrt2(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurveCurveInt2d set(OdGeCurve2d curve1, OdGeCurve2d curve2, OdGeTol tol)
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_set__SWIG_0(this.swigCPtr, OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2), OdGeTol.getCPtr(tol)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurveCurveInt2d set(OdGeCurve2d curve1, OdGeCurve2d curve2)
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_set__SWIG_1(this.swigCPtr, OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurveCurveInt2d set(OdGeCurve2d curve1, OdGeCurve2d curve2, OdGeInterval range1, OdGeInterval range2, OdGeTol tol)
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_set__SWIG_2(this.swigCPtr, OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2), OdGeInterval.getCPtr(range1), OdGeInterval.getCPtr(range2), OdGeTol.getCPtr(tol)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurveCurveInt2d set(OdGeCurve2d curve1, OdGeCurve2d curve2, OdGeInterval range1, OdGeInterval range2)
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_set__SWIG_3(this.swigCPtr, OdGeCurve2d.getCPtr(curve1), OdGeCurve2d.getCPtr(curve2), OdGeInterval.getCPtr(range1), OdGeInterval.getCPtr(range2)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeCurveCurveInt2d Assign(OdGeCurveCurveInt2d crvCrvInt)
		{
			OdGeCurveCurveInt2d result = new OdGeCurveCurveInt2d(GlobalsPINVOKE.OdGeCurveCurveInt2d_Assign(this.swigCPtr, OdGeCurveCurveInt2d.getCPtr(crvCrvInt)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
